package com.sptpc.androidclass1029;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.TimePicker;

public class MainActivity extends AppCompatActivity {
    private Button startService,stopService,continueService;
    private TextView tv_1;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        final Intent intent = new Intent(MainActivity.this, TimerService.class);
    startService = findViewById(R.id.start_service);
    tv_1 = findViewById(R.id.tv_1);
    stopService = findViewById(R.id.stop_service);
    continueService = findViewById(R.id.continue_service);
    startService.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            startService(intent);
        }
    });
    continueService.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            
        }
    });
    stopService.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            stopService(intent);
        }
    });

    }
}
